<?php
namespace Home\Controller;
use Think\Controller;
class CateController extends Controller {
   
   public function first()
   {
	   	$cate = D('cate');
	   	return $cate->first(0);
   }

   public function getCat($pid)
   {
   		$cate = D('cate');
	   	$info = $cate->first($pid);
	   	echo json_encode($info, JSON_UNESCAPED_UNICODE);
   }
}